package com.concurrent.chenjun.test;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExceptionThread implements Runnable
{
	public void run()
	{
		throw new RuntimeException("");
	}

	public static void main(String[] args)
	{
		try
		{
			ExecutorService exec = Executors.newCachedThreadPool();
			exec.execute(new ExceptionThread());
		}
		catch (RuntimeException e) //主线程中捕获线程异常无效,还是会抛出到控制台
		{
			e.printStackTrace();
		}
	}

}
